#ifndef _APP_PARAM_H
#define _APP_PARAM_H

#include "sys.h"
#include "param_define.h"

typedef enum
{
	PARAM_TYPE_INVALID,
	PARAM_TYPE_INT,
	PARAM_TYPE_FLOAT,
}param_type_e;

struct param_info_s
{
	char name[32];
	uint16_t param_counts;
	param_type_e type;
	int val_int;
	float val_float;

	struct param_info_s *next;
};

#define PARAM_ONE_SIZE     (sizeof(struct param_info_s))

void param_init(void);
void param_get(const char *name,void *value);
void param_set(const char *name,void *value,param_type_e type);
void param_save_all(void);
uint8_t param_load_all(void);
void param_define_default_int(const char *name,const int value);
void param_define_default_float(const char *name,const float value);


#endif

